<!--
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<div class="ddp-wrap-layout-popup" *ngIf="isShowFl">
  <div class="ddp-ui-layout-popup">
    <div class="ddp-box-popup3">
      <a href="javascript:" class="ddp-btn-close" (click)="closeChangePassword()"></a>
      <!-- title -->
      <div class="ddp-pop-title">{{'msg.comm.ui.profile.password.title' | translate}}</div>
      <!-- //title -->
      <!-- detail -->
      <div class="ddp-box-detail">
        <!-- error 시 ddp-type-error 추가 -->
        <div class="ddp-ui-input-form" [class.ddp-type-error]="resultPassword === false">
          <label class="ddp-label-type">{{'msg.comm.ui.profile.password' | translate}}</label>
          <div class="ddp-input-check">
            <input type="password" class="ddp-input-type" placeholder="{{'msg.comm.ph.profile.password' | translate}}"
                   [(ngModel)]="password"
                   (keyup)="initPasswordValidation()"
                   (blur)="passwordValidation()">
            <em class="ddp-icon-ok" *ngIf="resultPassword"></em>
            <em class="ddp-icon-error"></em>
          </div>
          <!-- error 메시지 -->
          <span class="ddp-ui-error">{{passwordMessage}}</span>
          <!-- //error 메시지 -->
        </div>
        <!-- error 시 ddp-type-error 추가 -->
        <div class="ddp-ui-input-form" [class.ddp-type-error]="resultNewPassword === false">
          <label class="ddp-label-type">{{'msg.comm.ui.profile.password.new' | translate}}</label>
          <div class="ddp-input-check">
            <input type="password" class="ddp-input-type" placeholder="{{'msg.comm.ph.profile.password.new' | translate}}"
                   [(ngModel)]="newPassword"
                   (keyup)="initNewPasswordValidation()"
                   (blur)="newPasswordValidation()">
            <em class="ddp-icon-ok" *ngIf="resultNewPassword"></em>
            <em class="ddp-icon-error"></em>
          </div>
          <!-- error 메시지 -->
          <span class="ddp-ui-error">{{newPasswordMessage}}</span>
          <!-- //error 메시지 -->
        </div>
        <!-- error 시 ddp-type-error 추가 -->
        <div class="ddp-ui-input-form" [class.ddp-type-error]="resultRePassword === false">
          <label class="ddp-label-type">{{'msg.comm.ui.profile.password.re' | translate}}</label>
          <div class="ddp-input-check">
            <input type="password" class="ddp-input-type" placeholder="{{'msg.comm.ph.profile.password.re' | translate}}"
                   [(ngModel)]="rePassword"
                   (keyup)="initRePasswordValidation()"
                   (blur)="rePasswordValidation()">
            <em class="ddp-icon-ok" *ngIf="resultRePassword"></em>
            <em class="ddp-icon-error"></em>
          </div>
          <!-- error 메시지 -->
          <span class="ddp-ui-error">{{rePasswordMessage}}</span>
          <!-- //error 메시지 -->
        </div>

      </div>
      <!-- detail -->


      <!-- button -->
      <div class="ddp-ui-buttons">
        <a href="javascript:" class="ddp-btn-type-popup" (click)="closeChangePassword()">{{'msg.comm.btn.cancl' | translate}}</a>
        <!-- disabled 시 ddp-disabled 추가 -->
        <a href="javascript:" class="ddp-btn-type-popup ddp-bg-black " (click)="doneChangePassword()">{{'msg.comm.btn.done' | translate}}</a>
      </div>
      <!-- //button -->
    </div>
  </div>
</div>
